package com.yt.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @Classname PayController
 * @Description
 * @Date 2021/10/25 20:34
 * @Create by 杨涛
 */
@RestController
@Slf4j
@RefreshScope
public class PayController {
    @Value("${server.port}")
    private String port;
    @Value("${config.info}")
    private String configinfo;

    @RequestMapping("/getport")
    public String getPort(){
        log.info("收到访问"+port);
        log.info("当前配置信息："+configinfo);
        return "alibaba - provider -prot:"+port+"\t id=="+ UUID.randomUUID();
    }
}
